#pragma once
#include <vector>
#include <math.h>

#include "World.h"
#include "Image.h"
#include "CollisionObject.h"
#include "Rectangle.h"
#include "Color.h"
#include "Shader.h"

class World;

class GameEntity
{
private:
	float xPos, yPos;
	float xVel, yVel;
	float angle;
	int width, height;
protected:
	Image* image;

	Shader* shader; //The shader to be applied to this entity.

public:
	GameEntity(World*, int x, int y);
	GameEntity(World*, int x, int y, Image* i);
	~GameEntity(void);

	virtual void update(); //use this to cycle through the entities lists that requre logic. Set collision objects new coordinates etc etc

	void commitMovement();

	void render(float interpolation, int xOffset, int yOffset);


	void setShader(Shader*);

	void move(float xVel, float yVel);
	void setX(int xPos);
	void setY(int yPos);
	float getX();
	float getY();
	float getXVel();
	float getYVel();
};
